package com.wechet.serveice;

import com.wechet.domain.ProductInfo;
import com.wechet.dto.CartDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Created by sc on 2017/9/20.
 */
public interface ProductInfoService {
    ProductInfo findOne(String productId);
    List<ProductInfo> findUpAll();//所有上架的商品
    Page<ProductInfo> findAll(Pageable pageable);
    ProductInfo save(ProductInfo productInfo);

    //加减库存
    void increaceStock(List<CartDTO> cartDTOList);

    void decreaseStock(List<CartDTO> cartDTOList);

    //上下架

    ProductInfo onSale(String productId);

    ProductInfo offSale(String productId);

}
